Integrand size = 14, antiderivative size = 375 \[ \int \frac {x}{1-x^3+x^6} \, dx=\frac {i \arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3 \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}-\frac {i \arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3 \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}+\frac {i \log \left (\sqrt [3]{1-i \sqrt {3}}-\sqrt [3]{2} x\right )}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}-\frac {i \log \left (\sqrt [3]{1+i \sqrt {3}}-\sqrt [3]{2} x\right )}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}-\frac {i \log \left (\left (1-i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1-i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{3\ 2^{2/3} \sqrt {3} \sqrt [3]{1-i \sqrt {3}}}+\frac {i \log \left (\left (1+i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1+i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{3\ 2^{2/3} \sqrt {3} \sqrt [3]{1+i \sqrt {3}}} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 375, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {1389, 298, 31, 648, 631, 210, 642} \[ \int \frac {x}{1-x^3+x^6} \, dx=\frac {i \arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3 \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}-\frac {i \arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3 \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}-\frac {i \log \left (2^{2/3} x^2+\sqrt [3]{2 \left (1-i \sqrt {3}\right )} x+\left (1-i \sqrt {3}\right )^{2/3}\right )}{3\ 2^{2/3} \sqrt {3} \sqrt [3]{1-i \sqrt {3}}}+\frac {i \log \left (2^{2/3} x^2+\sqrt [3]{2 \left (1+i \sqrt {3}\right )} x+\left (1+i \sqrt {3}\right )^{2/3}\right )}{3\ 2^{2/3} \sqrt {3} \sqrt [3]{1+i \sqrt {3}}}+\frac {i \log \left (-\sqrt [3]{2} x+\sqrt [3]{1-i \sqrt {3}}\right )}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}-\frac {i \log \left (-\sqrt [3]{2} x+\sqrt [3]{1+i \sqrt {3}}\right )}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}} \]
[In]
[Out]
Rule 31
Rule 210
Rule 298
Rule 631
Rule 642
Rule 648
Rule 1389
Rubi steps \begin{align*} \text {integral}& = -\frac {i \int \frac {x}{-\frac {1}{2}-\frac {i \sqrt {3}}{2}+x^3} \, dx}{\sqrt {3}}+\frac {i \int \frac {x}{-\frac {1}{2}+\frac {i \sqrt {3}}{2}+x^3} \, dx}{\sqrt {3}} \\ & = \frac {i \int \frac {1}{-\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}+x} \, dx}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}-\frac {i \int \frac {-\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}+x}{\left (\frac {1}{2} \left (1-i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )} x+x^2} \, dx}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}-\frac {i \int \frac {1}{-\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}+x} \, dx}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}+\frac {i \int \frac {-\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}+x}{\left (\frac {1}{2} \left (1+i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )} x+x^2} \, dx}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}} \\ & = \frac {i \log \left (\sqrt [3]{1-i \sqrt {3}}-\sqrt [3]{2} x\right )}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}-\frac {i \log \left (\sqrt [3]{1+i \sqrt {3}}-\sqrt [3]{2} x\right )}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}+\frac {i \int \frac {1}{\left (\frac {1}{2} \left (1-i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )} x+x^2} \, dx}{2 \sqrt {3}}-\frac {i \int \frac {1}{\left (\frac {1}{2} \left (1+i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )} x+x^2} \, dx}{2 \sqrt {3}}-\frac {i \int \frac {\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}+2 x}{\left (\frac {1}{2} \left (1-i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )} x+x^2} \, dx}{3\ 2^{2/3} \sqrt {3} \sqrt [3]{1-i \sqrt {3}}}+\frac {i \int \frac {\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}+2 x}{\left (\frac {1}{2} \left (1+i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )} x+x^2} \, dx}{3\ 2^{2/3} \sqrt {3} \sqrt [3]{1+i \sqrt {3}}} \\ & = \frac {i \log \left (\sqrt [3]{1-i \sqrt {3}}-\sqrt [3]{2} x\right )}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}-\frac {i \log \left (\sqrt [3]{1+i \sqrt {3}}-\sqrt [3]{2} x\right )}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}-\frac {i \log \left (\left (1-i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1-i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{3\ 2^{2/3} \sqrt {3} \sqrt [3]{1-i \sqrt {3}}}+\frac {i \log \left (\left (1+i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1+i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{3\ 2^{2/3} \sqrt {3} \sqrt [3]{1+i \sqrt {3}}}-\frac {i \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}\right )}{\sqrt {3} \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}+\frac {i \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}\right )}{\sqrt {3} \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}} \\ & = \frac {i \tan ^{-1}\left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3 \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}-\frac {i \tan ^{-1}\left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3 \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}+\frac {i \log \left (\sqrt [3]{1-i \sqrt {3}}-\sqrt [3]{2} x\right )}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}-\frac {i \log \left (\sqrt [3]{1+i \sqrt {3}}-\sqrt [3]{2} x\right )}{3 \sqrt {3} \sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}-\frac {i \log \left (\left (1-i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1-i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{3\ 2^{2/3} \sqrt {3} \sqrt [3]{1-i \sqrt {3}}}+\frac {i \log \left (\left (1+i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1+i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{3\ 2^{2/3} \sqrt {3} \sqrt [3]{1+i \sqrt {3}}} \\ \end{align*}
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.01 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.11 \[ \int \frac {x}{1-x^3+x^6} \, dx=\frac {1}{3} \text {RootSum}\left [1-\text {$\#$1}^3+\text {$\#$1}^6\&,\frac {\log (x-\text {$\#$1})}{-\text {$\#$1}+2 \text {$\#$1}^4}\&\right ] \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.04 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.10
method | result | size |
default | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{6}-\textit {\_Z}^{3}+1\right )}{\sum }\frac {\textit {\_R} \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{5}-\textit {\_R}^{2}}\right )}{3}\) | \(38\) |
risch | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{6}-\textit {\_Z}^{3}+1\right )}{\sum }\frac {\textit {\_R} \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{5}-\textit {\_R}^{2}}\right )}{3}\) | \(38\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 295, normalized size of antiderivative = 0.79 \[ \int \frac {x}{1-x^3+x^6} \, dx=-\frac {1}{108} \cdot 18^{\frac {2}{3}} {\left (i \, \sqrt {3} + 3\right )}^{\frac {1}{3}} {\left (\sqrt {-3} + 1\right )} \log \left (18^{\frac {1}{3}} {\left (\sqrt {3} {\left (i \, \sqrt {-3} - i\right )} + \sqrt {-3} - 1\right )} {\left (i \, \sqrt {3} + 3\right )}^{\frac {2}{3}} + 24 \, x\right ) + \frac {1}{108} \cdot 18^{\frac {2}{3}} {\left (i \, \sqrt {3} + 3\right )}^{\frac {1}{3}} {\left (\sqrt {-3} - 1\right )} \log \left (18^{\frac {1}{3}} {\left (\sqrt {3} {\left (-i \, \sqrt {-3} - i\right )} - \sqrt {-3} - 1\right )} {\left (i \, \sqrt {3} + 3\right )}^{\frac {2}{3}} + 24 \, x\right ) + \frac {1}{108} \cdot 18^{\frac {2}{3}} {\left (-i \, \sqrt {3} + 3\right )}^{\frac {1}{3}} {\left (\sqrt {-3} - 1\right )} \log \left (18^{\frac {1}{3}} {\left (\sqrt {3} {\left (i \, \sqrt {-3} + i\right )} - \sqrt {-3} - 1\right )} {\left (-i \, \sqrt {3} + 3\right )}^{\frac {2}{3}} + 24 \, x\right ) - \frac {1}{108} \cdot 18^{\frac {2}{3}} {\left (-i \, \sqrt {3} + 3\right )}^{\frac {1}{3}} {\left (\sqrt {-3} + 1\right )} \log \left (18^{\frac {1}{3}} {\left (\sqrt {3} {\left (-i \, \sqrt {-3} + i\right )} + \sqrt {-3} - 1\right )} {\left (-i \, \sqrt {3} + 3\right )}^{\frac {2}{3}} + 24 \, x\right ) + \frac {1}{54} \cdot 18^{\frac {2}{3}} {\left (i \, \sqrt {3} + 3\right )}^{\frac {1}{3}} \log \left (18^{\frac {1}{3}} {\left (i \, \sqrt {3} + 3\right )}^{\frac {2}{3}} {\left (i \, \sqrt {3} + 1\right )} + 12 \, x\right ) + \frac {1}{54} \cdot 18^{\frac {2}{3}} {\left (-i \, \sqrt {3} + 3\right )}^{\frac {1}{3}} \log \left (18^{\frac {1}{3}} {\left (-i \, \sqrt {3} + 3\right )}^{\frac {2}{3}} {\left (-i \, \sqrt {3} + 1\right )} + 12 \, x\right ) \]
[In]
[Out]
Time = 0.08 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.07 \[ \int \frac {x}{1-x^3+x^6} \, dx=\operatorname {RootSum} {\left (19683 t^{6} - 243 t^{3} + 1, \left ( t \mapsto t \log {\left (6561 t^{5} - 27 t^{2} + x \right )} \right )\right )} \]
[In]
[Out]
\[ \int \frac {x}{1-x^3+x^6} \, dx=\int { \frac {x}{x^{6} - x^{3} + 1} \,d x } \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 815 vs. \(2 (241) = 482\).
Time = 0.31 (sec) , antiderivative size = 815, normalized size of antiderivative = 2.17 \[ \int \frac {x}{1-x^3+x^6} \, dx=\text {Too large to display} \]
[In]
[Out]
Time = 8.52 (sec) , antiderivative size = 304, normalized size of antiderivative = 0.81 \[ \int \frac {x}{1-x^3+x^6} \, dx=\frac {\ln \left (x+\left (81\,x-\frac {27\,{\left (36-\sqrt {3}\,12{}\mathrm {i}\right )}^{2/3}}{4}\right )\,\left (-\frac {1}{162}+\frac {\sqrt {3}\,1{}\mathrm {i}}{486}\right )\right )\,{\left (36-\sqrt {3}\,12{}\mathrm {i}\right )}^{1/3}}{18}+\frac {\ln \left (x-\left (81\,x-\frac {27\,{\left (36+\sqrt {3}\,12{}\mathrm {i}\right )}^{2/3}}{4}\right )\,\left (\frac {1}{162}+\frac {\sqrt {3}\,1{}\mathrm {i}}{486}\right )\right )\,{\left (36+\sqrt {3}\,12{}\mathrm {i}\right )}^{1/3}}{18}-\frac {2^{2/3}\,\ln \left (x+\frac {2^{1/3}\,3^{2/3}\,{\left (3-\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}}{12}+\frac {2^{1/3}\,3^{1/6}\,{\left (3-\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}\,1{}\mathrm {i}}{4}\right )\,{\left (3-\sqrt {3}\,1{}\mathrm {i}\right )}^{1/3}\,\left (3^{1/3}+3^{5/6}\,1{}\mathrm {i}\right )}{36}-\frac {2^{2/3}\,\ln \left (x+\frac {2^{1/3}\,3^{2/3}\,{\left (3+\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}}{12}-\frac {2^{1/3}\,3^{1/6}\,{\left (3+\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}\,1{}\mathrm {i}}{4}\right )\,{\left (3+\sqrt {3}\,1{}\mathrm {i}\right )}^{1/3}\,\left (3^{1/3}-3^{5/6}\,1{}\mathrm {i}\right )}{36}-\frac {2^{2/3}\,\ln \left (x-\frac {2^{1/3}\,3^{2/3}\,{\left (3-\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}}{6}\right )\,{\left (3-\sqrt {3}\,1{}\mathrm {i}\right )}^{1/3}\,\left (3^{1/3}-3^{5/6}\,1{}\mathrm {i}\right )}{36}-\frac {2^{2/3}\,\ln \left (x-\frac {2^{1/3}\,3^{2/3}\,{\left (3+\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}}{6}\right )\,{\left (3+\sqrt {3}\,1{}\mathrm {i}\right )}^{1/3}\,\left (3^{1/3}+3^{5/6}\,1{}\mathrm {i}\right )}{36} \]
[In]
[Out]